package com.neuedu.carsystem.dao.impl;

import java.util.List;
import java.util.Map;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.neuedu.carsystem.dao.JobDao;
import com.neuedu.carsystem.model.Job;
@Repository
public class JobDaoImpl implements JobDao {
	@Autowired
	private SqlSessionTemplate sqlSessionTemplate;
	public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
		this.sqlSessionTemplate = sqlSessionTemplate;
	}
	@Override
	public List<Job> findJobAll(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.getMapper(JobDao.class).findJobAll(map);
	}
	@Override
	public Job findById(int id) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.getMapper(JobDao.class).findById(id);
	}
	@Override
	public int addJob(Job u) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.getMapper(JobDao.class).addJob(u);
	}
	@Override
	public int deleteJob(int id) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.getMapper(JobDao.class).deleteJob(id);
	}
	@Override
	public int updateJob(int u) {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.getMapper(JobDao.class).updateJob(u);
	}
	@Override
	public int countJob() {
		// TODO Auto-generated method stub
		return sqlSessionTemplate.getMapper(JobDao.class).countJob();
	}
	

}
